﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cashier_Model
{
    [Table(Tablename = "bill_purchase_goods")]
    public class BillPurchaseGoods: BaseModel
    {
        private Int64 id;

        [Table(Columnname="id", Columntype="bigint", Iskey=true, Iscondition=true, Fieldothername="g", Isdeletefield=true)]
        public Int64 Id
        {
            get { return id; }
            set { id = value; }
        }

        private String enterpriseNo;

        [Table(Columnname = "enterprise_no", Columntype = "varchar", Iscondition = true, Fieldothername="g", Isdeletefield = true)]
        public String EnterpriseNo
        {
            get { return enterpriseNo; }
            set { enterpriseNo = value; }
        }

        private String storeNo;

        [Table(Columnname = "store_no", Columntype = "varchar", Iscondition = true, Fieldothername="g")]
        public String StoreNo
        {
            get { return storeNo; }
            set { storeNo = value; }
        }

        private String purchaseNo;

        [Table(Columnname = "purchase_no", Columntype="varchar", Iscondition=true, Fieldothername="g", Isdeletefield=true)]
        public String PurchaseNo
        {
            get { return purchaseNo; }
            set { purchaseNo = value; }
        }

        private Int64 goodsId;

        [Table(Columnname = "goods_id", Columntype="bigint")]
        public Int64 GoodsId
        {
            get { return goodsId; }
            set { goodsId = value; }
        }

        private String barcode;

        [Table(Columnname="barcode", Columntype="varchar", Iscondition=true, Fieldothername="g")]
        public String Barcode
        {
            get { return barcode; }
            set { barcode = value; }
        }

        private String categoryName;

        [Table(Columnname = "category_name", Columntype="varchar")]
        public String CategoryName
        {
            get { return categoryName; }
            set { categoryName = value; }
        }

        private String goodsName;

        [Table(Columnname = "goods_name", Columntype = "varchar", Iscondition=true, Fieldothername="g")]
        public String GoodsName
        {
            get { return goodsName; }
            set { goodsName = value; }
        }

        private String goodsNorm;

        [Table(Columnname = "goods_norm", Columntype = "varchar")]
        public String GoodsNorm
        {
            get { return goodsNorm; }
            set { goodsNorm = value; }
        }

        private Decimal priceCost;

        [Table(Columnname = "price_cost", Columntype = "decimal")]
        public Decimal PriceCost
        {
            get { return priceCost; }
            set { priceCost = value; }
        }

        private Decimal discount;

        [Table(Columnname = "discount", Columntype = "decimal")]
        public Decimal Discount
        {
            get { return discount; }
            set { discount = value; }
        }

        private Decimal priceDisc;

        [Table(Columnname = "price_disc", Columntype = "decimal")]
        public Decimal PriceDisc
        {
            get { return priceDisc; }
            set { priceDisc = value; }
        }

        private Int32 numbers;

        [Table(Columnname = "numbers", Columntype = "int")]
        public Int32 Numbers
        {
            get { return numbers; }
            set { numbers = value; }
        }

        private Decimal total;

        [Table(Columnname = "total", Columntype = "decimal")]
        public Decimal Total
        {
            get { return total; }
            set { total = value; }
        }

        private String note;

        [Table(Columnname = "note", Columntype = "varchar")]
        public String Note
        {
            get { return note; }
            set { note = value; }
        }

        private String adminUsername;

        [Table(Columnname = "admin_username", Columntype = "varchar", Iscondition = true, Fieldothername = "g")]
        public String AdminUsername
        {
            get { return adminUsername; }
            set { adminUsername = value; }
        }

        private String adminName;

        [Table(Columnname = "admin_name", Columntype = "varchar", Iscondition = true, Fieldothername = "g")]
        public String AdminName
        {
            get { return adminName; }
            set { adminName = value; }
        }
        
        private DateTime createtime;

        [Table(Columnname = "createtime", Columntype = "datetime")]
        public DateTime Createtime
        {
            get { return createtime; }
            set { createtime = value; }
        }

        private DateTime purchaseDate;

        [Table(Columnname = "purchase_date", Columntype = "datetime", Isinsertfield=false)]
        public DateTime PurchaseDate
        {
            get { return purchaseDate; }
            set { purchaseDate = value; }
        }

        private String startDate;

        public String StartDate
        {
            get { return startDate; }
            set { startDate = value; }
        }

        private String endDate;

        public String EndDate
        {
            get { return endDate; }
            set { endDate = value; }
        }
    }
}
